package com.gr.staffpm.projects.service;

import java.util.Date;
import java.util.List;

import com.gr.staffpm.datatypes.Project;
import com.gr.staffpm.datatypes.Task;
import com.gr.staffpm.datatypes.User;

/**
 * A service interface for accessing and modifying project data in the system.
 */
public interface ProjectService {

    void createProject(String name, String desc, Date startDate);

    List<Project> getAllProjects(User user);

    List<Project> getAllProjects(User user, int first, int count, String property, boolean ascending);

    Project getProject(int projectId);

    void deleteProject(int projectId);

    void updateProject(Project project);

    List<Task> getAllTasks(Project project);

    List<Task> getTasks(Project project, int first, int count, String property, boolean ascending);

    List<Task> getTasksCreated(Project project, Date startDate, Date endDate);

    List<Task> getTasksResolved(Project project, Date startDate, Date endDate);

    Task getTask(int id);

    void addProject(Project newProject);

    boolean checkProjectExists(Project project);

}
